package com.mycar2w.cloud.entity;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * created time 2017/4/1
 *
 * @author ljc
 * @version V1.0
 * 制动测试
 */
@Entity
@Table(name = "car_system_test_chassis", schema = "mycar2wnew", catalog = "")
public class CarSystemTestChassis {
    private Long id;
    private Long carId;
    private String silencer;
    private String leftFrontShockAbsorber;
    private String rightFrontShockAbsorber;
    private String rightRearShockAbsorber;
    private String leftRearShockAbsorber;

    @Id
    @Column(name = "id", nullable = false)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "car_id", nullable = true)
    public Long getCarId() {
        return carId;
    }

    public void setCarId(Long carId) {
        this.carId = carId;
    }

    @Basic
    @Column(name = "Silencer", nullable = true)
    public String getSilencer() {
        return silencer;
    }

    public void setSilencer(String silencer) {
        this.silencer = silencer;
    }

    @Basic
    @Column(name = "left_front_shock_absorber", nullable = true)
    public String getLeftFrontShockAbsorber() {
        return leftFrontShockAbsorber;
    }

    public void setLeftFrontShockAbsorber(String leftFrontShockAbsorber) {
        this.leftFrontShockAbsorber = leftFrontShockAbsorber;
    }

    @Basic
    @Column(name = "right_front_shock_absorber", nullable = true)
    public String getRightFrontShockAbsorber() {
        return rightFrontShockAbsorber;
    }

    public void setRightFrontShockAbsorber(String rightFrontShockAbsorber) {
        this.rightFrontShockAbsorber = rightFrontShockAbsorber;
    }

    @Basic
    @Column(name = "right_rear_shock_absorber", nullable = true)
    public String getRightRearShockAbsorber() {
        return rightRearShockAbsorber;
    }

    public void setRightRearShockAbsorber(String rightRearShockAbsorber) {
        this.rightRearShockAbsorber = rightRearShockAbsorber;
    }

    @Basic
    @Column(name = "left_rear_shock_absorber", nullable = true)
    public String getLeftRearShockAbsorber() {
        return leftRearShockAbsorber;
    }

    public void setLeftRearShockAbsorber(String leftRearShockAbsorber) {
        this.leftRearShockAbsorber = leftRearShockAbsorber;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        CarSystemTestChassis that = (CarSystemTestChassis) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (carId != null ? !carId.equals(that.carId) : that.carId != null) return false;
        if (silencer != null ? !silencer.equals(that.silencer) : that.silencer != null) return false;
        if (leftFrontShockAbsorber != null ? !leftFrontShockAbsorber.equals(that.leftFrontShockAbsorber) : that.leftFrontShockAbsorber != null)
            return false;
        if (rightFrontShockAbsorber != null ? !rightFrontShockAbsorber.equals(that.rightFrontShockAbsorber) : that.rightFrontShockAbsorber != null)
            return false;
        if (rightRearShockAbsorber != null ? !rightRearShockAbsorber.equals(that.rightRearShockAbsorber) : that.rightRearShockAbsorber != null)
            return false;
        if (leftRearShockAbsorber != null ? !leftRearShockAbsorber.equals(that.leftRearShockAbsorber) : that.leftRearShockAbsorber != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (carId != null ? carId.hashCode() : 0);
        result = 31 * result + (silencer != null ? silencer.hashCode() : 0);
        result = 31 * result + (leftFrontShockAbsorber != null ? leftFrontShockAbsorber.hashCode() : 0);
        result = 31 * result + (rightFrontShockAbsorber != null ? rightFrontShockAbsorber.hashCode() : 0);
        result = 31 * result + (rightRearShockAbsorber != null ? rightRearShockAbsorber.hashCode() : 0);
        result = 31 * result + (leftRearShockAbsorber != null ? leftRearShockAbsorber.hashCode() : 0);
        return result;
    }
}
